﻿

'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic



Public Class dc_DiskES
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_attresLastEdit = strUserId
    End Sub

#End Region

#Region " Properties and Fields "

    Private m_attresKey As Int32
    Private m_attresCompKey As Int32
    Private m_attresVirtualHostKey As Int32
    Private m_attresPriNetKey As Int32
    Private m_attresRedNetKey As Int32
    Private m_attresLUN As Integer
    Private m_attresShared As String
    Private m_attresPath As String
    Private m_attresPerformance As String
    Private m_attresSize As Integer
    Private m_attresComments As String
    Private m_attresLastEdit As String
    Private m_attresLastUpdate As Date

    Private Const constAttrEsKey As Int32 = -1
    Private Const constAttrEsCompKey As Int32 = -1
    Private Const constAttrEsVirtualHostKey As Int32 = -1
    Private Const constAttrEsPriNetKey As Int32 = -1
    Private Const constAttrEsRedNetKey As Int32 = -1
    Private Const constAttrEsLUN As Integer = -1
    Private Const constAttrEsShared As String = "shared"
    Private Const constAttrEsPath As String = "C:"
    Private Const constAttrEsPerformance As String = "Standard"
    Private Const constAttrEsSize As Integer = 20
    Private Const constAttrEsComments As String = "none"
    Private Const constAttrEsLastEdit As String = "na"
    Private Const constAttrEsLastUpdate As Date = #1/1/2001#

    Public Property attresKey() As Int32
        Get
            Return Me.m_attresKey
        End Get
        Set(ByVal value As Int32)
            Me.m_attresKey = value
            Me.OnPropertyChanged("attresKey")
        End Set
    End Property

    Public Property attresVirtualHostKey() As Int32
        Get
            Return Me.m_attresVirtualHostKey
        End Get
        Set(ByVal value As Int32)
            Me.m_attresVirtualHostKey = value
            Me.OnPropertyChanged("attresVirtualHostKey")
        End Set
    End Property

    Public Property attresPriNetKey() As Int32
        Get
            Return Me.m_attresPriNetKey
        End Get
        Set(ByVal value As Int32)
            Me.m_attresPriNetKey = value
            Me.OnPropertyChanged("attresPriNetKey")
        End Set
    End Property

    Public Property attresRedNetKey() As Int32
        Get
            Return Me.m_attresRedNetKey
        End Get
        Set(ByVal value As Int32)
            Me.m_attresRedNetKey = value
            Me.OnPropertyChanged("attresRedNetKey")
        End Set
    End Property


    Public Property attresCompKey() As Int32
        Get
            Return Me.m_attresCompKey
        End Get
        Set(ByVal value As Int32)
            Me.m_attresCompKey = value
            Me.OnPropertyChanged("attresCompKey")
        End Set
    End Property


    Public Property attresLUN() As Integer
        Get
            Return Me.m_attresLUN
        End Get
        Set(ByVal value As Integer)
            Me.m_attresLUN = value
            Me.OnPropertyChanged("attresLUN")
        End Set
    End Property

    Public Property attresShared() As String
        Get
            Return Me.m_attresShared
        End Get
        Set(ByVal value As String)
            Me.m_attresShared = value
            Me.OnPropertyChanged("attresShared")
        End Set
    End Property

    Public Property attresPath() As String
        Get
            Return Me.m_attresPath
        End Get
        Set(ByVal value As String)
            Me.m_attresPath = value
            Me.OnPropertyChanged("attresPath")
        End Set
    End Property

    Public Property attresPerformance() As String
        Get
            Return Me.m_attresPerformance
        End Get
        Set(ByVal value As String)
            Me.m_attresPerformance = value
            Me.OnPropertyChanged("attresPerformance")
        End Set
    End Property

    Public Property attresSize() As Integer
        Get
            Return Me.m_attresSize
        End Get
        Set(ByVal value As Integer)
            Me.m_attresSize = value
            Me.OnPropertyChanged("attresSize")
        End Set
    End Property

    Public Property attresComments() As String
        Get
            Return Me.m_attresComments
        End Get
        Set(ByVal value As String)
            Me.m_attresComments = value
            Me.OnPropertyChanged("attresComments")
        End Set
    End Property

    Public Property attresLastEdit() As String
        Get
            Return Me.m_attresLastEdit
        End Get
        Set(ByVal value As String)
            Me.m_attresLastEdit = value
            Me.OnPropertyChanged("attresLastEdit")
        End Set
    End Property

    Public Property attresLastUpdate() As Date
        Get
            Return Me.m_attresLastUpdate
        End Get
        Set(ByVal value As Date)
            Me.m_attresLastUpdate = value
            Me.OnPropertyChanged("attresLastUpdate")
        End Set
    End Property





#End Region

#Region " Methods "


    Public Sub initProperties()

        Try

            attresKey = constAttrEsKey
            attresCompKey = constAttrEsCompKey
            attresVirtualHostKey = constAttrEsVirtualHostKey
            attresPriNetKey = constAttrEsPriNetKey
            attresRedNetKey = constAttrEsRedNetKey
            attresLUN = constAttrEsLUN
            attresShared = constAttrEsShared
            attresPath = constAttrEsPath
            attresPerformance = constAttrEsPerformance
            attresSize = constAttrEsSize
            attresComments = constAttrEsComments
            attresLastEdit = constAttrEsLastEdit
            attresLastUpdate = Now

        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub




#End Region


End Class


